# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libunistring
pkgver=1.2
pkgrel=0
pkgdesc="Library for manipulating Unicode strings and C strings"
url="https://www.gnu.org/software/libunistring/"
arch="all"
options="!check"  # Tests fail with musl locale library
license="GPL-2.0-or-later OR LGPL-3.0-or-later"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc"
source="https://ftp.gnu.org/gnu/libunistring/libunistring-$pkgver.tar.xz"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
5fbb5a0a864db73a6d18cdea7b31237da907fff0ef288f3a8db6ebdba8ef61ad8855e5fc780c2bbf632218d8fa59dd119734e5937ca64dc77f53f30f13b80b17  libunistring-1.2.tar.xz
"
